Skip to content

Instantly share code, notes, and snippets.

@kosmikus
Created December 20, 2019 18:04
Show Gist options
  • Select an option

  • Save kosmikus/b58ab97e2cd26d34cd1f06c588ff86fd to your computer and use it in GitHub Desktop.

Select an option

Save kosmikus/b58ab97e2cd26d34cd1f06c588ff86fd to your computer and use it in GitHub Desktop.

Revisions

  1. kosmikus created this gist Dec 20, 2019.
    8 changes: 8 additions & 0 deletions SOPTail.hs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    {-# LANGUAGE DataKinds, FlexibleContexts, TypeFamilies, TypeOperators #-}
    module SOPTail where

    import Data.SOP
    import Data.SOP.Dict

    test :: (All c ys, ys ~ (x : xs)) => Proxy x -> Proxy c -> Dict (All c) xs
    test _ _ = Dict