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 GHC2021 #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE PolyKinds, DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE DerivingVia #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module InfiniteHigherOrderEffect where | |
import Data.Kind (Type) | |
import Data.Functor.Contravariant (Contravariant) |
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 GADTs #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeOperators #-} | |
-- For the "Another take" | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE FunctionalDependencies #-} |
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 BangPatterns #-} | |
module Main where | |
main :: IO () | |
main = putStrLn "Compiles" | |
letBangPattern :: Int | |
letBangPattern = let !x = 1 + 2 in x |