Created
April 16, 2018 04:29
-
-
Save Sophia-Gold/6ca8e336e27540060a058a2d4efe5fb3 to your computer and use it in GitHub Desktop.
Power Serious using -XOverloadedLists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE OverloadedLists #-} | |
| import GHC.Exts | |
| newtype PowS' a = PowS' { fromPowS :: [a] } | |
| instance IsList (PowS' a) where | |
| type (Item (PowS' a)) = a | |
| fromList a = PowS' a | |
| toList a = fromPowS a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment